# -*- coding: utf-8 -*- 
# @project : 《Atcoder》
# @Author : created by bensonrachel on 2021/12/11
# @File : 231.C - Counting 2.py
import bisect
n,q = map(int,input().split())

a = list(map(int,input().split()))

a.sort()

for i in range(q):
    x = int(input())
    ans = bisect.bisect_left(a,x)
    # if ans > len(a):
    #     ans = len(a)
    # print(len(a) - ans)
    print(len(a) - ans)


